import axios from "axios";
export default {
    searchUser(data) {
        return axios({
            method: "GET",
            params: data,
            url: '/ban/search'
        })
    },
    getBanDurationList() {
        return axios.get('/ban/banDurations')
    },
    //    },
    //    addAdmin(data){
    //     return axios({
    //         method:"POST",
    //         params:data,
    //         url:'/administrator/admin'
    //     })
    //    },
    //    delAdmin(data){
    //     return axios({
    //         method:"DELETE",
    //         params:data,
    //         url:'/administrator/admin'
    //     })
    //    },
    getIsBanned(data) {
        return axios({
            method:"GET",
            params:data,
            url:'/ban/isBanned'
        })
    }
    , 
       getBanPage(data) {
        return axios({
            method:"GET",
            params:data,
            url:'/ban/page'
        })
    },
    ban(data) {
        return axios({
            method:"POST",
           data,
           headers: {'Content-Type':'application/x-www-form-urlencoded'},
            url:'/ban/execute'
        })
    },
    unban(data) {
        return axios({
            method:"DELETE",
           data,
           headers: {'Content-Type':'application/x-www-form-urlencoded'},
            url:'/ban/execute'
        })
    },

}